import com.goal98.team.Constants

security {

    // see DefaultSecurityConfig.groovy for all settable/overridable properties

    active = true

    loginUserDomainClass = "Person"
    authorityDomainClass = "Authority"
    requestMapClass = "Requestmap"

    defaultRole = Constants.ROLE_BASIC_MEMBER

    useRequestMapDomainClass = false
    requestMapString = """
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/googlef79fb40551a149ab.html = IS_AUTHENTICATED_ANONYMOUSLY
/sitemap.xml= IS_AUTHENTICATED_ANONYMOUSLY
/robots.txt= IS_AUTHENTICATED_ANONYMOUSLY
/images/**= IS_AUTHENTICATED_ANONYMOUSLY
/js/**= IS_AUTHENTICATED_ANONYMOUSLY
/css/**= IS_AUTHENTICATED_ANONYMOUSLY
/login/**= IS_AUTHENTICATED_ANONYMOUSLY
/register/**= IS_AUTHENTICATED_ANONYMOUSLY
/searchable/**= IS_AUTHENTICATED_ANONYMOUSLY
/captcha/**= IS_AUTHENTICATED_ANONYMOUSLY
/help/**= IS_AUTHENTICATED_ANONYMOUSLY
/tour/**= IS_AUTHENTICATED_ANONYMOUSLY
/info/pendingtask= IS_AUTHENTICATED_FULLY
/info/teamcloud= IS_AUTHENTICATED_ANONYMOUSLY
/info/playercloud= IS_AUTHENTICATED_ANONYMOUSLY
/info/showplayer= IS_AUTHENTICATED_ANONYMOUSLY
/m/login/**=IS_AUTHENTICATED_ANONYMOUSLY
/monitoring/**=${Constants.ROLE_ADMIN}
/team/**=${Constants.ROLE_ADMIN}
/position/**=${Constants.ROLE_ADMIN}
/myteam/edit=${Constants.ROLE_TEAM_ADMIN}
/myteam/update=${Constants.ROLE_TEAM_ADMIN}
/teamactivity/edit=${Constants.ROLE_TEAM_ADMIN}
/teamactivity/create=${Constants.ROLE_TEAM_ADMIN}
/venue/edit=${Constants.ROLE_ADMIN}
/venue/update=${Constants.ROLE_ADMIN}
/venue/create=${Constants.ROLE_ADMIN}
/backdoor.gsp=${Constants.ROLE_ADMIN}
/**=IS_AUTHENTICATED_FULLY
    """

//    useMail = true
    mailHost = 'smtp.gmail.com'
    mailUsername = 'team.admin@goal98.com'
    mailPassword = '541116'
    mailFrom = 'team.admin@goal98.com'
    mailPort = 465
    javaMailProperties = ['mail.smtp.auth': 'true',
            'mail.smtp.starttls.enable': 'true',
            'mail.smtp.socketFactory.port': 465,
            'mail.smtp.socketFactory.class': 'javax.net.ssl.SSLSocketFactory',
            'mail.smtp.socketFactory.fallback': 'false',
            'mail.debug': 'false']
}

environments {
    production {
        security.useMail = true
    }
    development {
        security.useMail = true
    }

}